/**
 * Copyright (C), 2015-2019, XXX有限公司
 * FileName: StaticFactoryClient
 * Author:   zhouheng
 * Date:     2019/5/1 10:08
 * Description: 静态工厂客户端
 * History:
 * <author>          <time>          <version>          <desc>
 * 作者姓名           修改时间           版本号              描述
 */
package com.zhouh.patterns.com.zhouh.create.factory.simpleFactory;

import com.zhouh.patterns.com.zhouh.entity.Fruit;

/**
 * 〈一句话功能简述〉<br> 
 * 〈静态工厂客户端〉
 *
 * @author zhouheng
 * @create 2019/5/1
 * @since 1.0.0
 */
public class StaticFactoryClient {
    public static void main(String[] args){
        zhouh1();
    }

    private static void zhouh1() {
        Fruit fruit = StaticFactory.getFruit(StaticFactory.TYPE_APPLE);
        fruit.draw();

        System.out.println("zhou1 eat");
    }

    private static void zhouh2() {
        Fruit fruit = StaticFactory.getFruit(StaticFactory.TYPE_BANANA);
        fruit.draw();

        System.out.println("zhou2 eat");
    }

    private static void zhouh3() {
        Fruit fruit = StaticFactory.getFruit(StaticFactory.TYPE_ORANGE);
        fruit.draw();

        System.out.println("zhou3 eat");
    }
}